<!DOCTYPE html>
<html>
<head>
	<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<script type="text/javascript" src="js/vue.js"></script>
    <meta charset="utf-8">
</head>
<body >
<div>F12查看console控制台</div>
<div id="aaa">
</div>

<script type="text/javascript">
  var myMixin = {
    methods:{
      foo:function(){
        console.log("foo");
      },
      conflicting:function(){
        console.log("from myMixin");
      }
    }
  } 
  var Mixin = {
    methods:{
      foo2:function(){
        console.log("foo2");
      },
      conflicting2:function(){
        console.log("from mixin");
      }
    }
  } 
  var vm = new Vue({
    mixins :[myMixin,Mixin],
    methods:{
      bar : function(){
        console.log("bar");
      },
      conflicting:function(){
        console.log("form self");
      }
    }
  });

  vm.foo();
  vm.foo2();
  vm.bar();
  vm.conflicting();
</script>
</body>
</html>


